package com.spring_mysql_redis.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.spring_mysql_redis.entity.Friend;
import com.spring_mysql_redis.entity.UserDynamic;
import com.spring_mysql_redis.entity.Users;
import com.spring_mysql_redis.mapper.FriendMapper;
import com.spring_mysql_redis.mapper.UsersMapper;
import com.spring_mysql_redis.service.FriendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class FriendServiceImpl extends ServiceImpl<FriendMapper, Friend> implements FriendService {

    @Autowired
    private FriendMapper friendMapper;

    @Autowired
    private UsersMapper usersMapper;

    /**
     * 分页查询用户信息
     *
     * @param friend
     * @return
     */
    @Override
    public Page<Users> selectFriendList(Page<Users> friend, String uuId) {
        System.out.println("----------------"+friendMapper.getFriendList(friend, uuId));

        return friendMapper.getFriendList(friend, uuId);
    }
}
